package com.wash.shoes.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wash.shoes.entity.UserBlacklistPo;
import com.wash.shoes.mapper.UserBlackListMapper;
import com.wash.shoes.page.PageFactory;
import com.wash.shoes.service.UserBlackListService;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @description: 用户黑名单列表实现类
 * @author: wanxy
 * @date: 2024-12-26 23:49
 **/
@Service
public class UserBlackListServiceImpl extends ServiceImpl<UserBlackListMapper, UserBlacklistPo> implements UserBlackListService {

    @Override
    public Page<UserBlacklistPo> pageList(UserBlacklistPo userBlacklistPo) {
        Page<UserBlacklistPo> page = PageFactory.defaultPage();
        List<UserBlacklistPo> dataList = baseMapper.pageList(page, userBlacklistPo);
        page.setRecords(dataList);
        return page;

    }

    @Override
    public List<UserBlacklistPo> queryBlacklistByPhoneNumber(String phoneNumber) {
        return this.baseMapper.queryBlacklistByPhoneNumber(phoneNumber);

    }


}
